package com.typhoon.spring_jdbctemplate.consumer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.typhoon.spring_jdbctemplate.entity.User;
import com.typhoon.spring_jdbctemplate.service.UserService;
import com.typhoon.spring_jdbctemplate.util.SpringContextUtil;

public class RedisCacheConsumer {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		new ClassPathXmlApplicationContext("spring-root.xml").start();
		
		UserService userService = SpringContextUtil.getBean("userService", UserService.class);
		User u = userService.selectById(1L);
		System.out.println(u);
		u.setName("hongxia");
		userService.update(u);
	}
}
